// src/main.js
import { createApp } from "vue";
import App from "./App.vue";
import "./style.css";
// 引入 Pinia
import { createPinia } from "pinia";
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
// import { SECURITY_JS_CODE } from "./utils/config.js";

// window._AMapSecurityConfig = {
//   securityJsCode: SECURITY_JS_CODE,
// };
//引入 router
import router from "./router";

// 引入 Element Plus 和样式
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";

//引入axios
// import axiosInstance from "@/utils/request.js";

const app = createApp(App);
// 屏蔽 vue 警告
app.config.warnHandler = () => {};
// 将 axios 实例挂载到全局
// app.config.globalProperties.$axios = axiosInstance;

// 使用 Pinia
app.use(createPinia());

// 使用 Element Plus
app.use(ElementPlus);

app.use(router);
app.mount("#app");
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}
